package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)" json:"username"`
	Password string `gorm:"type:varchar(50)" json:"password"`
}

type Coll struct {
	gorm.Model
	Title   string `gorm:"varchar(30)" json:"title"`
	Content string `gorm:"varchar(50)" json:"content"`
}
type TextColl struct {
	gorm.Model
	Username string `gorm:"varchar(30)" json:"username"`
	Sex      string `gorm:"varchar(30)" json:"sex"`
}
type CollList struct {
	gorm.Model
	Title    string `gorm:"varchar(30)" json:"title"`
	Content  string `gorm:"varchar(50)" json:"content"`
	Username string `gorm:"varchar(30)" json:"username"`
	Sex      string `gorm:"varchar(30)" json:"sex"`
}

type Role struct {
	gorm.Model
	Uid      int    `gorm:"int" json:"uid"`
	RoleName string `gorm:"varchar(50)" json:"roleName"`
	RoleSex  string `gorm:"varchar(40)" json:"roleSex"`
}
type UserRole struct {
	Rid      int    `gorm:"int"`
	Username string `gorm:"type:varchar(50)" json:"username"`
	Password string `gorm:"type:varchar(50)" json:"password"`
	RoleName string `gorm:"varchar(50)" json:"roleName"`
	RoleSex  string `gorm:"varchar(40)" json:"roleSex"`
}
